//
//  SerengetiCLController.m
//  HelloThere
//
//  Created by Lita Gratrix on 12/10/09.
//  Copyright 2009 __MyCompanyName__. All rights reserved.
//

#import "SerengetiCLController.h"


@implementation SerengetiCLController

@synthesize locationManager;
@synthesize delegate;

- (id) init {
	NSLog(@"Entering SerengetiCLController init\n");
	self = [super init];
	if (self != nil) {
		self.locationManager = [[[CLLocationManager alloc] init] autorelease];
		self.locationManager.delegate = self;
	}
	return self;
}

- (void)locationManager:(CLLocationManager *)manager didUpdateToLocation:(CLLocation *)newLocation 
		   fromLocation:(CLLocation *)oldLocation{
	[self.delegate locationUpdate:newLocation];
}

- (void)locationManager:(CLLocationManager *)manager didFailWithError:(NSError *)error {
	[self.delegate locationError:error];
}

- (void)dealloc {
	[self.locationManager release];
	[super dealloc];
}

@end
